package jaux.tank.bean.entity.system;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import lombok.experimental.FieldNameConstants;

/**
 * Created  on 2018/4/2 0002.
 *
 */
@Entity
@Table(name = "t_sys_cfg")
@FieldNameConstants
public class Cfg extends EntityWithObjectId{
	@Basic
	@Column(name = "cfg_name")
    private String cfgName;
	@Basic
	@Column(name = "cfg_value")
    private String cfgValue;
	@Basic
	@Column(name = "cfg_desc")
    private String cfgDesc;
	@ManyToOne(optional = true)
	@NotFound(action = NotFoundAction.IGNORE)
	private Cfg parentCfg;

    public String getCfgName() {
        return cfgName;
    }

    public void setCfgName(String cfgName) {
        this.cfgName = cfgName;
    }

    public String getCfgValue() {
        return cfgValue;
    }

    public void setCfgValue(String cfgValue) {
        this.cfgValue = cfgValue;
    }

    public String getCfgDesc() {
        return cfgDesc;
    }

    public void setCfgDesc(String cfgDesc) {
        this.cfgDesc = cfgDesc;
    }

	
	public Cfg getParentCfg() {
		return parentCfg;
	}

	
	public void setParentCfg(Cfg parentCfg) {
		this.parentCfg = parentCfg;
	}

}
